<!DOCTYPE html>
<html lang="zh-hans">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{% block title %}珠海航展数据管理系统{% endblock %}</title>
    <!-- Bootstrap CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- 自定义样式 -->
    <style>
        .navbar-brand {
            font-weight: bold;
        }
        .footer {
            margin-top: 50px;
            padding: 20px 0;
            background-color: #f8f9fa;
            border-top: 1px solid #e7e7e7;
        }
        .card {
            margin-bottom: 20px;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }
        .card-header {
            background-color: #f8f9fa;
            font-weight: bold;
        }
    </style>
    {% block extra_css %}{% endblock %}
</head>
<body>
    <!-- 导航栏 -->
    <nav class="navbar navbar-expand-lg navbar-dark bg-primary mb-4">
        <div class="container">
            <a class="navbar-brand" href="{% url 'airshow:index' %}">珠海航展</a>
            <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse" id="navbarNav">
                <ul class="navbar-nav">
                    <li class="nav-item">
                        <a class="nav-link" href="{% url 'airshow:index' %}">首页</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="{% url 'airshow:area_list_view' %}">展区</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="{% url 'airshow:exhibitor_list' %}">参展商</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="{% url 'airshow:exhibit_info_list' %}">展品</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="{% url 'airshow:schedule_list' %}">活动日程</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="{% url 'airshow:event_details_list' %}">活动详情</a>
                    </li>
                    <li class="nav-item dropdown">
                        <a class="nav-link dropdown-toggle" href="#" id="navbarDropdownData" role="button" data-bs-toggle="dropdown" aria-expanded="false">
                            数据管理
                        </a>
                        <ul class="dropdown-menu" aria-labelledby="navbarDropdownData">
                            <li><a class="dropdown-item" href="{% url 'airshow:direct_data' table='area' %}">区域数据</a></li>
                            <li><a class="dropdown-item" href="{% url 'airshow:direct_data' table='exhibitor' %}">参展商数据</a></li>
                            <li><a class="dropdown-item" href="{% url 'airshow:direct_data' table='exhibit' %}">展品数据</a></li>
                            <li><a class="dropdown-item" href="{% url 'airshow:direct_data' table='schedule' %}">日程数据</a></li>
                            <li><a class="dropdown-item" href="{% url 'airshow:direct_data' table='attendance' %}">参与数据</a></li>
                        </ul>
                    </li>
                </ul>
                <ul class="navbar-nav ms-auto">
                    <li class="nav-item">
                        <a class="nav-link" href="/admin/">管理后台</a>
                    </li>
                </ul>
            </div>
        </div>
    </nav>

    <!-- 主要内容 -->
    <div class="container">
        {% block content %}{% endblock %}
    </div>

    <!-- 页脚 -->
    <footer class="footer mt-auto">
        <div class="container text-center">
            <p class="text-muted">珠海航展数据管理系统 &copy; {% now "Y" %}</p>
        </div>
    </footer>

    <!-- Bootstrap JS 和 Popper.js -->
    <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.6/dist/umd/popper.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.min.js"></script>
    
    {% block extra_js %}{% endblock %}
</body>
</html> 